//
//  ZZVideoVC.swift
//  QMXK
//
//  Created by jenkin on 2018/12/13.
//  Copyright © 2018年 jenkin. All rights reserved.
//

import UIKit

class ZZVideoVC: ZZBaseVC {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.setUI()
    }
    
    override func setUI() {
        
        super.setUI()
        self.myNavBar.isHidden = true
        for index in 0..<3{
            let btn:UIButton = ZZViewUtil.shareViewUtil.createButton(title: String(index * 10 + 10), selectTitle: String(index * 10 + 10), titleColor: ColorConst.shareColorConst.titleColor())
            self.view.addSubview(btn)
            btn.tag = index
            btn.snp.makeConstraints { (make) in
                make.centerX.equalTo(self.view)
                make.width.equalTo(100)
                make.top.equalTo(index * 120 + 50)
                make.height.equalTo(50)
            }
            
            btn.addTarget(self, action: #selector(clickAction(sender:)), for: UIControl.Event.touchUpInside)
        }
    }
    
    @objc func clickAction(sender: UIButton){
        
        ZZBaseUtil.shareUtil.saveCellW(type: sender.tag)
        let action:UIAlertController = UIAlertController.init(title: "修改成功", message: "", preferredStyle: UIAlertController.Style.alert)
        let sure:UIAlertAction = UIAlertAction.init(title: "确定", style: UIAlertAction.Style.default, handler: nil)
        action.addAction(sure)
        self.present(action, animated: true, completion: nil)
    }
}
